
package com.excesys.exsecs.energy.mapper;

import com.excesys.exsecs.common.data.datascope.ExsecsBaseMapper;
import com.excesys.exsecs.energy.entity.PowerHourFlow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 能耗支路总电表按小时流水记录
 *
 * @author zhangtailong
 * @date 2023-12-26 11:01:55
 */
@Mapper
public interface PowerHourFlowMapper extends ExsecsBaseMapper<PowerHourFlow> {

    Float sumPowerList(@Param("timeValue") String timeValue);


    List<Map<String, Object>> powerAnalyse(@Param("startTime") String startTime,
                                           @Param("endTime") String endTime,
                                           @Param("energyType") String energyType);

    List<Map<String, Object>> powerHourAnalyse(@Param("startTime") String startTime,
                                               @Param("endTime") String endTime,
                                               @Param("energyType") String energyType);

    List<Map<String, Object>> powerGroupAreaByDate(@Param("timeValue") String timeValue, @Param("areaName") String areaName, @Param("order") String order);


    List<Map<String, Object>> powerGroupBranchingByDate(@Param("timeValue") String timeValue, @Param("branchName") String branchName, @Param("order") String order);


    Float powerSumByWhere(@Param("timeValue") String timeValue);

    Float powerByWhere(@Param("params") Map<String, Object> params);

    Double sumPowerAllNumber(@Param("energyType") String energyType, @Param("timeValue") String timeValue);

    List<Map> getPowerAreaList(@Param("params") Map params);

    PowerHourFlow getCostOne(@Param("unitNo") String unitNo);
}
